package com.woniu1.service.impl;

import com.woniu1.dao.UserDao;
import com.woniu1.pojo.User;
import com.woniu1.service.UserService;

public class UserServiceImpl implements UserService {
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public int addOne(User user) {
        return userDao.addOne(user);
    }

    public int delete(String name) {
        int i = userDao.delete(name);
        return i;
    }

    public void update(String name, int age) {
        userDao.update("AKUMA", 40);
    }

    public User findByName(String name) {
        User user = userDao.findByName(name);
        return user;
    }
}
